package j03state;

public class J1 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(()->{
            System.out.println("enter t1");
            for (int i = 0; i < 100; i++) {
                System.out.println("t1="+i);
            }
            System.out.println("t1 end");
        });
        System.out.println(t1.getState());//new
        t1.start();
        System.out.println(t1.getState());//RUNNABLE
        System.out.println("main end");

        Thread.sleep(1000);
        //TERMINATED  terminated
        System.out.println("t1-over="+t1.getState());
    }
}
